from fastapi import FastAPI
from middlewares.cors_middleware import add_core_middleware
from middlewares.gzip_middleware import add_gzip_middleware


def handle_middleware(app: FastAPI) -> None:
    """
    注册中间件
    :param app:
    :return:
    """
    add_core_middleware(app)
    add_gzip_middleware(app)
